package org.dandsoft.blackbox.laboratory.tests.replace;

import org.dandsoft.blackbox.SignalId;
import org.dandsoft.blackbox.Time;
import org.dandsoft.blackbox.counter.RelationshipCounter;

import java.util.Set;
import java.util.Map;
import java.util.Hashtable;

/**
 * @author Vilyuzhanin Denis (Fin)
 */
public class Layer {

    private int level;
    private Replacer replacer = new Replacer();
    private Set<SignalId> inputSignals;
    private Set<SignalId> outputSignals;

    public void print() {
        replacer.printInfo();
    }

    public void input(Set<SignalId> signals) {
        this.inputSignals = signals;
    }

    public Set<SignalId> output() {
        return this.outputSignals;
    }

    public void handle(Time time) {
        this.outputSignals = replacer.replace(time, inputSignals);
    }


    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
        replacer.setLevel(level);
    }

    public Replacer getReplacer() {
        return replacer;
    }

    public void setReplacer(Replacer replacer) {
        this.replacer = replacer;
        this.replacer.setLevel(level);
    }
}
